<template>
  <div class="son">
    <div>从父组件获取零花钱: {{ pinMoney }}</div>
    <button @click="emit('changeToy', '七龙珠')">发送玩具信息</button>
  </div>
</template>

<script setup lang="ts">
defineProps<{
  pinMoney: number;
}>();
const emit = defineEmits<{
  changeToy: [toy: string];
}>();
</script>

<style scoped>
@import "../common.css";
</style>
